package com.dj.mingkong.common.util;

import org.apache.commons.lang3.StringUtils;

public class PhoneUtils {
    public static final String PHONE_BLUR_REGEX = "(\\w{3})\\d{4}(\\w{4})";
    public static final String PHONE_BLUR_REPLACE_REGEX = "$1****$2";

    public PhoneUtils() {
    }

    public static final String blurPhone(String phone) {
        return StringUtils.isBlank(phone) ? "" : phone.replaceAll("(\\w{3})\\d{4}(\\w{4})", "$1****$2");
    }
}
